requirejs.config({
    baseUrl:SZ.JS_URL,
    paths:{
        angular:"../js/angular/angular.min",
        "angular-animate":"../js/angular/angular-animate.min",
        "angular-bootstrap":"../js/angular/ui-bootstrap-tpls.min",
        "angular-route":"../js/angular/angular-route.min",
        "angular-route-segment":"../js/angular/angular-route-segment.min",
        "angular-scroll-glue":"../js/angular/angular-scroll-glue.min",
        bootstrap:"../js/bootstrap/bootstrap.min",
        jquery:"../js/jquery/jquery.min",
        spin:"../js/spin/spin.min",
        "jquery.json":"../js/jquery.json/jquery.json.min",
        "jquery.cookie":"../js/jquery.cookie/jquery.cookie.min",
        moment:"../js/moment/moment.min",
        "moment.langs":"../js/moment/langs.min",
        SzLib:"../js/sz/SzLib.min",
        SzSpin:"../js/sz/SzSpin.min",
        "socket.io":"../js/socket.io/socket.io.min",
        pako:"../js/pako/pako.min",
        base64js:"../js/base64js/base64js.min",
        gm:"../js/gm/gm"
    },
    shim:{
        jquery:{exports:"$"},
        bootstrap:{deps:["jquery"]},
        "jquery.json":{deps:["jquery"]},
        "jquery.cookie":{deps:["jquery"]},
        spin:{exports:"Spinner"},
        angular:{exports:"angular"},
        "angular-animate":["angular"],
        "angular-bootstrap":["angular"],
        "angular-route":["angular"],
        "angular-route-segment":["angular"],
        "angular-scroll-glue":["angular"]
    },
    priority:["angular"]
});

require([
    'angular',
    'gm',
    'bootstrap'
], function(angular) {
    'use strict';
    var $html = angular.element(document.getElementsByTagName('html')[0]);
    angular.element().ready(function() {
        var gm = require("gm");
        angular.bootstrap($html, [gm.name]);
        SZ.APP = gm;
    });
});